<template>
  <view class="uni-margin-wrap">
    <swiper class="swiper" circular
            :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
            :duration="duration">
      <swiper-item v-for="(item,index) in bannerList" :key="item.id">
        <image :src="item.pic"
               mode="aspectFill" class="swiper-image"
        ></image>
      </swiper-item>
    </swiper>
  </view>
</template>
<script>
import {getBannerList} from "../../models/banner";

export default {
  data() {
    return {
      indicatorDots: true,
      autoplay: true,
      interval: 2000,
      duration: 500
    }
  },
  props:{
    bannerList:{
      type:Array,
      default:()=>{
        return []
      }
    }
  },
  mounted() {

  },
  methods: {

  }
}
</script>

<style>
.uni-margin-wrap {
  width: 690 rpx;
  width: 100%;;
}

.swiper {
  height: 300 rpx;
}

.swiper-item {
  display: block;
  height: 300 rpx;
  line-height: 300 rpx;
  text-align: center;
}

.swiper-list {
  margin-top: 40 rpx;
  margin-bottom: 0;
}

.uni-common-mt {
  margin-top: 60 rpx;
  position: relative;
}

.info {
  position: absolute;
  right: 20 rpx;
}

.uni-padding-wrap {
  width: 550 rpx;
  padding: 0 100 rpx;
}

.swiper-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

</style>
